
include std/unittest.e
include qt/core.e
include qt/gsl.e

object _ = 0


atom gsl_perm =  gsl_permutation_calloc(3)
      gsl_permutation_init(gsl_perm)
atom gsl_c = gsl_combination_calloc(3, 2)

 gsl_combination_init_first(gsl_c)


   atom stdo = stdFILE(1)
     printf (1, ",{%3d{", {3})
      loop do
            printf (1, ",{", {})
                gsl_combination_fprintf (stdo, gsl_c, "%1d,")
                gsl_permutation_fprintf (stdo, gsl_perm, "%1d,")
            printf (1, "}", {})
               gsl_combination_next(gsl_c)
       until gsl_permutation_next(gsl_perm) != GSL_SUCCESS
       printf (1, "}\n}\n", {})

gsl_combination_free(gsl_c)
gsl_permutation_free(gsl_perm)
gsl_combination_free(gsl_c)

       
atom h2 = gsl_histogram2d_calloc(4, 1)
atom h = gsl_histogram_calloc(4)
       
    --~ gsl_histogram2d_set_ranges_uniform (h2, a, b)
    --~ gsl_histogram_set_ranges_uniform (h, a, b)

     gsl_histogram2d_increment (h2, 1,1)
     gsl_histogram_increment (h, 1)
       
    gsl_histogram2d_fprintf (stdo, h2, "%g", "%g")
    gsl_histogram_fprintf (stdo, h, "%g", "%g")

    gsl_histogram2d_free(h2)
    gsl_histogram_free(h)

    test_equal("gsl_freed", 1 ,1)

test_report()
